# -*- coding:utf-8 -*-
# @Time:2024/4/1921:01
# @Author:miuzg
# @FileName:new test2.py
# @Software:PyCharm

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Edge()

url = 'https://www.mi.com/shop'

driver.get(url)

driver.maximize_window()

a_list = driver.find_elements(By.XPATH,'//li[@class="brick-item brick-item-m brick-item-m-2"]//a')

for a in a_list:
    print(a.text)
    print()


input("按回车关闭浏览器")